<me:UIVRP x:Class="WPFExcelReport.TVKKVR05"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:me="clr-namespace:WPFExcelReport" 
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"
                    xmlns:T="clr-namespace:WPFExcelReport;assembly=IntexBL"     
                    xmlns:ZA="clr-namespace:WPFExcelReport;assembly=TZABED"  
                    xmlns:VA="clr-namespace:WPFExcelReport;assembly=TVAART" 
                    xmlns:VF="clr-namespace:WPFExcelReport;assembly=TVAFARBEN" 
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT"  
                    xmlns:KD="clr-namespace:WPFExcelReport;assembly=TKDSTAMM" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    x:Name="TV"
                    Loaded="Window_Loaded"
     >
    <me:UIVRP.Resources>
        <CollectionViewSource  x:Key="vwMaster"/>       <CollectionViewSource  x:Key="vwDetail"/>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:TIMES100  x:Key="X100"/>
        <ucd:TIMES10  x:Key="X10"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:NOTConverter x:Key="not"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </me:UIVRP.Resources>
    <Grid>
        <Grid.RowDefinitions>
             <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="1*"></RowDefinition>
        </Grid.RowDefinitions>
        <WrapPanel  >
            <Grid Margin="10,0,0,0" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Button   Click="ManageCommand" Height="20" Margin="5,0,0,0" Width="24" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Extend.png" />
                    </Button.Background>
                </Button>
            </Grid>
            <Grid Margin="10,0,0,0" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Button   Click="RefreshCommand" Height="20" Margin="5,0,0,0" Width="24" >
                    <Button.Background>
                        <ImageBrush  ImageSource="/ImagePackage;component/Images/Refresh.png" />
                    </Button.Background>
                </Button>
            </Grid>
            <WrapPanel>
                <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=发票:}}"></TextBlock>
                <TextBlock Grid.Column="1"  Text="{Binding VRPRENR,Converter={StaticResource pnum}}"   Width="Auto" />
                <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=-}}"></TextBlock>
                <TextBlock Grid.Column="2"  Text="{Binding VRPREPOS,Converter={StaticResource pnum}}"   Width="Auto" />

                <TextBlock   Grid.Column="0" Text="{Binding Source={Localization:Translate Word=单:}}"></TextBlock>
                <TextBlock Grid.Column="1"  Text="{Binding VRPAUFKRS}"   Width="Auto" />
                <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=-}}"></TextBlock>
                <TextBlock Grid.Column="2"  Text="{Binding VRPAUFLFD,Converter={StaticResource pnum}}"   Width="Auto" />
                <TextBlock  Grid.Column="0" Text="{Binding Source={Localization:Translate Word=-}}"></TextBlock>
                <TextBlock Grid.Column="3"  Text="{Binding VRPAUFPOS,Converter={StaticResource pnum}}"   Width="Auto" />
            </WrapPanel>
      
        </WrapPanel>

        <DataGrid  Grid.Row="1"  
                   VerticalAlignment="Top"  
                   AutoGenerateColumns="False"
                   EnableRowVirtualization="False"
                   VerticalScrollBarVisibility="Auto"
                   HorizontalScrollBarVisibility="Auto"
                   HeadersVisibility="Column"  
                   ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                   IsSynchronizedWithCurrentItem="True" 
                   x:Name="dlgMaster"  
                   RowDetailsVisibilityMode="Visible"
                    >
            <DataGrid.Columns>
                <DataGridCheckBoxColumn Width="40" Binding="{Binding Path=IsSelected,RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type DataGridRow}}}">
                    <DataGridCheckBoxColumn.HeaderTemplate>
                        <DataTemplate>
                            <CheckBox x:Name="ckbSelectedAll" Checked="ckbSelectedAll_Click" Unchecked="ckbSelectedAll_Unchecked"></CheckBox>
                        </DataTemplate>
                    </DataGridCheckBoxColumn.HeaderTemplate>
                </DataGridCheckBoxColumn>
                <DataGridTextColumn Binding="{Binding Path=VRPZOLLTNR}"  Header="{Binding Source={Localization:Translate Word=比例}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPBONKZ}"  Header="{Binding Source={Localization:Translate Word=已付}}" Width="Auto" />
                 <DataGridTextColumn Binding="{Binding Path=VRPART,Converter={StaticResource ResourceKey=gb2312}}"  Header="{Binding Source={Localization:Translate Word=品种}}" Width="Auto" />               
                 <DataGridTextColumn Binding="{Binding Path=VRPAUFKRS}"   Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPAUFLFD, Converter={StaticResource ResourceKey=pnum}}"   Header="{Binding Source={Localization:Translate Word=单}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPAUFPOS, Converter={StaticResource ResourceKey=pnum}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPMENGET4, Converter={StaticResource ResourceKey=d100}}" Header="{Binding Source={Localization:Translate Word=数量}}"  Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPPREIS, Converter={StaticResource ResourceKey=d1000}}" Header="{Binding Source={Localization:Translate Word=单价}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPGESWERT, Converter={StaticResource ResourceKey=d1000}}"  Header="{Binding Source={Localization:Translate Word=金额}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPPROVA1, Converter={StaticResource ResourceKey=d1000}}"  Header="{Binding Source={Localization:Translate Word=佣金}}" Width="Auto" />                
                 <DataGridTextColumn Binding="{Binding Path=VRPZUABWERT1, Converter={StaticResource ResourceKey=d100}}"  Header="{Binding Source={Localization:Translate Word=附加费1}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPZUABWERT2, Converter={StaticResource ResourceKey=d100}}"  Header="{Binding Source={Localization:Translate Word=附加费2}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPZUABWERT3, Converter={StaticResource ResourceKey=d100}}"  Header="{Binding Source={Localization:Translate Word=附加费3}}" Width="Auto" />
                <DataGridTextColumn Binding="{Binding Path=VRPFARBE,Converter={StaticResource ResourceKey=gb2312}}"  Header="{Binding Source={Localization:Translate Word=色号}}" Width="Auto" />
             </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</me:UIVRP> 
 
